Re: Speeding up LIKE with placeholders?
От | Dan Sugalski |
---|---|
Тема | Re: Speeding up LIKE with placeholders? |
Дата | |
Msg-id | a06110400bd68f8fd22da@[10.0.1.5] обсуждение исходный текст |
Ответ на | Re: Speeding up LIKE with placeholders? (Pierre-Frédéric Caillaud<lists@boutiquenumerique.com>) |
Список | pgsql-general |
At 12:30 PM +0200 9/11/04, Pierre-Frédéric Caillaud wrote: > If I understand correctly your problem is >that the plan for your prepared query is bad >because the LIKE parameter is not known at >prepare time... Almost. My problem is that queries made with the PQexecParams C call are automatically split into a prepare and execute pair. So while as far as my code's concerned everything goes over to the server in one big wad, the same as if I'd sent it over with a PQexec call, the server sees it in several pieces. The only way to fix this is to change the way that PQexecParams is handled, which from what I can see of the postgres code would require a protocol change and corresponding extension of the server back end, or a change in the way prepared queries are executed by the server, neither of which is a particularly simple thing to do. (Which I didn't realize initially) -- Dan --------------------------------------it's like this------------------- Dan Sugalski even samurai dan@sidhe.org have teddy bears and even teddy bears get drunk
В списке pgsql-general по дате отправления: